AAWin =  cc.Class.extend({
	aawinSprite:null,
	main:null,
	offsetX:null,
	offsetY:null,
	w:null,
	h:null,
	ctor:function (parent) {
		this.aawinSprite = new cc.Sprite();
		parent.addChild(this.aawinSprite, 20, TAG_AAWIN_ROOT);
		this.offsetX = 48;
		this.offsetY = 30;
		this.init();
	},
	init:function() {
		this.main = new FlashAngel(this.aawinSprite,"#main1.png",1,TAG_DEFAULT);
		w = this.main.width;
		h = this.main.height;
		this.sample_list = new FlashAngel(this.aawinSprite,"#sample_list.png",1,TAG_DEFAULT);
		this.button_yiqi = new FlashAngel(this.aawinSprite,"#yiqi.png",2,TAG_AAWIN_YIQI,true);
		this.select = new FlashAngel(this.aawinSprite,"#select.png",1,TAG_DEFAULT);
		this.e_lamp = new FlashAngel(this.aawinSprite,"#e_lamp.png",1,TAG_AAWIN_ELAMP,true);
		this.celiang = new FlashAngel(this.aawinSprite,"#celiang.png",2,TAG_AAWIN_CELIANG,true);
		this.ranshao = new FlashAngel(this.aawinSprite,"#ranshao.png",2,TAG_AAWIN_RANSHAO,true);
		this.select_lamp = new FlashAngel(this.aawinSprite,"#select_lamp.png",1,TAG_DEFAULT);
		this.button_next = new FlashAngel(this.aawinSprite,"#next.png",2,TAG_AAWIN_NEXT,true);
		this.button_peak = new FlashAngel(this.aawinSprite,"#peak.png",2,TAG_AAWIN_PEAK,true);
		this.s_peak = new FlashAngel(this.aawinSprite,"#s_peak.png",1,TAG_DEFAULT);
		this.button_close = new FlashAngel(this.aawinSprite,"#close_up.png",2,TAG_AAWIN_CLOSE,true);
		this.button_finish = new FlashAngel(this.aawinSprite,"#finish.png",2,TAG_AAWIN_FINISH,true);
		this.param_set = new FlashAngel(this.aawinSprite,"#celiang_set.png",1,TAG_DEFAULT);
		this.button_sure = new FlashAngel(this.aawinSprite,"#sure.png",2,TAG_AAWIN_SURE,true);
		this.param = new FlashAngel(this.aawinSprite,"#param.png",2,TAG_AAWIN_PARAM,true);
		this.param_lay = new FlashAngel(this.aawinSprite,"#param_lay1.png",1,TAG_DEFAULT);
		this.info_exe = new FlashAngel(this.aawinSprite,"#info_exe.png",2,TAG_AAWIN_INFO,true);
		this.sample = new FlashAngel(this.aawinSprite,"#sample.png",2,TAG_AAWIN_SAMPLE,true);
		this.sample_guide = new FlashAngel(this.aawinSprite,"#sample_guide1.png",1,TAG_DEFAULT);
		this.fire_up = new FlashAngel(this.aawinSprite,"#fire_up.png",2,TAG_AAWIN_FIREUP,true);
		this.energy = new FlashAngel(this.aawinSprite,"#energy.png",2,TAG_AAWIN_ENERGY,true);
		this.energy_debug = new FlashAngel(this.aawinSprite,"#energy_debug.png",1,TAG_DEFAULT);
		this.energy_auto = new FlashAngel(this.aawinSprite,"#energy_auto.png",2,TAG_AAWIN_EAUTO,true);
		this.energy_close = new FlashAngel(this.aawinSprite,"#energy_close.png",2,TAG_AAWIN_ECLOSE,true);
		this.test = new FlashAngel(this.aawinSprite,"#test.png",2,TAG_AAWIN_TEST,true);
		this.energy_point = new EnergyPointer(this.aawinSprite,"#energy_point.png",1,TAG_DEFAULT);
		
		this.test_dialog = new FlashAngel(this.aawinSprite.getParent(),"#test_dialog.png",20,TAG_DEFAULT);
		this.test_start = new FlashAngel(this.aawinSprite.getParent(),"#test_start.png", 21,TAG_AAWIN_START,true);
		this.test_zero = new FlashAngel(this.aawinSprite.getParent(),"#test_zero.png", 21,TAG_AAWIN_ZERO,true);
		
		this.main.setVisible(true);
		this.button_yiqi.setVisible(true);
		
		this.main.setPosition(this.offsetX, this.offsetY);
		this.sample_list.setPosition(this.offsetX, this.offsetY + 28);
		this.button_yiqi.setPosition(this.offsetX + w * 0.3, this.offsetY + h * 0.895);
		this.select.setPosition(this.offsetX + w * 0.3, this.offsetY + h * 0.895 - this.select.height);
		this.e_lamp.setPosition(this.offsetX + w * 0.3, this.offsetY + h * 0.22);
		this.celiang.setPosition(this.offsetX + w * 0.3, this.offsetY + h * 0.745);
		this.ranshao.setPosition(this.offsetX + w * 0.3, this.offsetY + h * 0.701);
		this.select_lamp.setPosition(this.offsetX + w * 0.2, this.offsetY + h * 0.2);
		this.button_next.setPosition(this.offsetX + w * 0.575, this.offsetY + h * 0.225);
		this.button_peak.setPosition(this.offsetX + w * 0.692, this.offsetY + h * 0.58);
		this.s_peak.setPosition(this.offsetX + w * 0.2, this.offsetY + h * 0.1);
		this.button_close.setPosition(this.offsetX + w * 0.7252, this.offsetY + h * 0.12);
		this.button_finish.setPosition(this.offsetX + w * 0.685, this.offsetY + h * 0.225);
		this.param_set.setPosition(this.offsetX + w * 0.2, this.offsetY + h * 0.1);
		this.button_sure.setPosition(this.offsetX + w * 0.37, this.offsetY + h * 0.128);
		this.param.setPosition(this.offsetX + w * 0.42, this.offsetY + h * 0.805);
		this.param_lay.setPosition(this.offsetX + w * 0.4, this.offsetY + 10);
		this.info_exe.setPosition(this.offsetX + w * 0.5355, this.offsetY + h * 0.764 + 10);
		this.sample.setPosition(this.param.x-this.sample.width,this.param.y);
		this.sample_guide.setPosition(this.offsetX + w * 0.2, this.offsetY + h * 0.1);
		this.fire_up.setPosition(this.offsetX + w * 0.66, this.param.y);
		this.energy.setPosition(this.offsetX + w * 0.6 - 12, this.offsetY + 7);
		this.energy_debug.setPosition(this.offsetX + w * 0.2, this.offsetY + h * 0.2);
		this.energy_auto.setPosition(this.offsetX + w * 0.2 + 180, this.offsetY + h * 0.2 + 12);
		this.energy_close.setPosition(this.offsetX + w * 0.2 + 380, this.offsetY + h * 0.2 + 12);
		this.energy_point.setAnchorPoint(102/121,11/71);
		this.energy_point.setPosition(this.offsetX + 365, this.offsetY + 270);
		this.test.setPosition(this.offsetX + w * 0.26, this.param.y);
		this.test_dialog.setPosition(gg.width - this.test_dialog.width - 20,gg.height * 0.7);
		this.test_start.setPosition(this.test_dialog.x + this.test_dialog.width * 0.73,this.test_dialog.y + this.test_dialog.height * 0.5);
		this.test_zero.setPosition(this.test_dialog.x + this.test_dialog.width * 0.73,this.test_dialog.y + this.test_dialog.height * 0.32);

	},
	setVisible:function(bool){
		this.aawinSprite.setVisible(bool);
	},
	isVisible:function(){
		return this.aawinSprite.isVisible();
	}
});